home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / fweb / fweb-1.40 / boot / unix / apollo / READ_ME.APOLLO < prev   
Text File  |  1993-10-29  |  4KB  |  142 lines

  1.          --- BOOTSTRAPPING FWEB on the APOLLO ---
  2.                    Version 1.23
  3.                  February 15, 1992
  4.  
  5.    This subdirectory is intended for bootstrapping on the Apollo
  6. workstation.  However, this code hasn't yet been tested locally for v. 1.1
  7. or v. 1.2, as I don't have access to an Apollo.  Therefore, IF YOU'RE
  8. THINKING OF WORKING WITH FWEB ON THE APOLLO, PLEASE see the appendix below,
  9. and/or CHECK WITH ME.
  10.  
  11.    To bootstrap, do the following from your top-level fweb directory:
  12.  
  13.     set BOOT = boot/unix/apollo
  14.     cp $BOOT/.fweb $HOME
  15.     cp $BOOT/custom.h web
  16.  
  17.   * Edit setup.mk to reflect your directory structure.
  18.  
  19.   * Edit web/custom.h as best you can, following the instructions in that file.
  20.  
  21.   * Edit $BOOT/defaults.mk to specify your compile and link line.
  22.  
  23. Then, say
  24.  
  25.         make bootstrap
  26.  
  27. If you have difficulty compiling, go back, play with custom.h some more,
  28. and try again.  Let me know what you did.
  29.  
  30.  
  31. APPENDIX:  CHANGES for APOLLO RELEASE SR10.2
  32.  
  33. Steve Brown has graciously provided (August 22, 1991) the following changes
  34. appropriate for the not-fully-ANSI release SR10.2.  I haven't had time to
  35. rework the source code to incorporate these changes, so I include his
  36. message here essentially verbatim:
  37.  
  38. -------------------------------------------------------------------------------
  39. The first file I changed was boot/unix/apollo/default.mk.  The compiler
  40. won't let you use -o $@ to name the output file when the -c switch is used.
  41. I also use the -xansi switch which tells the compiler to use all the ANSI
  42. features it has.  A diff of the old and new versions follows,
  43.  
  44.  
  45. % diff defaults.mk.orig defaults.mk 
  46.  
  47. A31       CC = $(compiler) -c -g -o $@
  48. changed to
  49. B31       CC = $(compiler) -c -g -W0,-xansi
  50.  
  51.  
  52. There were three things that I changed in boot/unix/apollo/custom.h.
  53. Firstly I added a prototype for getenv().  Secondly, the files <limits.h>
  54. or <values.h> aren't supplied by the system so I added #define's for MAXINT
  55. and MAXLONG.  The only non-trivial change that is needed is the handling of
  56. variable argument lists.  The Apollo supports a mixture of ANSI and
  57. classical handling of variable arguments.  It is quite happy about the ANSI
  58. prototype format with the elipsis to denote the variable arguments but its
  59. va_start only takes a single argument as per the Sun.  If you define
  60. VARIABLE_ARGUMENTS and set NUM_VA_ARGS to 1 it will however fail to compile
  61. because the prototype of the function differs from the actual function
  62. definition.  For example, take the function nsprintf in file common.web.
  63. Its prototype is
  64.  
  65. int nsprintf(char *s, char *fmt, int n, ...)
  66.  
  67. whereas its definition is
  68.  
  69. int nsprintf(va_alist)
  70. va_dcl
  71. { ... }
  72.  
  73. The compiler expects the arguments to match out to the elipsis in the
  74. prototype. 
  75.  
  76. My solution was to set NUM_VA_ARGS to 2 so the ANSI stuff is used in the
  77. function definition.  I had to edit os.h to use the single argument option
  78. for va_start.  I also had to change the definition of C2 so, that the start
  79. of the variable argument list is initialised properly.
  80.  
  81. Using these changed the new function definition is
  82.  
  83. int nsprintf(char *s, char *fmt, int n, int va_alist)
  84.  
  85. which matches the prototype.  The last argument would be better expressed
  86. as va_dcl which is what it is, however va_dcl expands to int va_alist; and we
  87. don't need the semicolon.
  88.  
  89. In summary, here are the file differences,
  90.  
  91.  
  92. % diff custom.h.orig custom.h
  93.  
  94. B75       char *getenv(char *name);
  95. inserted before
  96. A75       
  97.  
  98.  
  99. A152      #include<values.h>
  100. changed to
  101. B153      
  102. B154      #define MAXINT  2147483647
  103. B155      #define MAXLONG 2147483647
  104.  
  105.  
  106. A174      /*  #define VARIABLE_ARGUMENTS */
  107. changed to
  108. B177      #define VARIABLE_ARGUMENTS
  109.  
  110.  
  111. A179      #define NUM_VA_ARGS 2
  112. changed to
  113. B182      #define NUM_VA_ARGS 2    /* Really one but we will fix up os.h */
  114.  
  115.  
  116.  
  117. % diff os.h.orig os.h
  118.  
  119. A285      #define VA_START(a,n) va_start(a,n)
  120. changed to
  121. B285      #define VA_START(a,n) va_start(a)
  122.  
  123.  
  124. A348      #define C2(cmnt) ,...) /* Variable args. */
  125. changed to
  126. B348      #define C2(cmnt) , int va_alist) /* Variable args. */
  127.  
  128.  
  129.  
  130. I also had to make one change to ratfor.c to overcome a strange compiler
  131. bug.  The line in question caused the compiler to crash!
  132.  
  133.  
  134. % diff ratfor.c.orig ratfor.c
  135.  
  136. A4050     made_temp?id0(icase):copy_out(a,pa,!macro);
  137. changed to
  138. B4050     if (made_temp) id0(icase); else copy_out(a,pa,!macro);
  139. -------------------------------------------------------------------------------
  140.  
  141.  
  142.